package com.gaogzhen.threadPool;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Slf4j(topic = "TestThreadPollExecutor01")
public class TestThreadPollExecutor02 {
    public static void main(String[] args) {
        ExecutorService pool = Executors.newSingleThreadExecutor();
        pool.execute(() -> {int i = 1/0;});
        pool.execute(() -> log.debug("2"));
        pool.execute(() -> log.debug("3"));
    }
}
